/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UCM;

import Source.LogoutUser;
import Views.ViewLogoutUser;

/**
 *
 * @author Joshua King
 */
public class UCLogoutUser implements UCController {
    
    ViewLogoutUser view;
    LogoutUser model = new LogoutUser();
    
    public UCLogoutUser(ViewLogoutUser view) {
        this.view = view;
    }
    
   /**
    * Precondition: User is logged in.
    * 1. User clicks on logout button.
    * 2. System logs user off.
    * 3. System refreshes main UI.
    * Postcondition: User is logged out, and main ui is refreshed.
    */
    public void run() {
        //2. System logs user off.
        model.logUserOut();
        //3. System refreshes mian UI.
        view.updateView();
    }

}
